<extend name="public:template" />
<block name="title">清理缓存</block>
<block name="content">
    <div class="wrap-page">
        <div id="pageCache" class="page-content">
            <div class="box">
                <div class="box-title clearfix"><span class="title">缓存更新</span></div>
                <div class="box-content">
                    <form action="#" class="form default-style">
                        <dl class="clearfix">
                            <dt><label>站点数据缓存：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <a class="button button-blue btn-clear" data-url="{:U('cache/clear',array('type'=>'site'))}">缓存更新</a>
                                </div>
                                <div class="item-prompt">修改过站点设置，或者栏目管理，模块安装等时可以进行缓存更新</div>
                            </dd>
                        </dl>
                        <dl class="clearfix">
                            <dt><label >站点模板缓存：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <a class="button button-blue btn-clear" data-url="{:U('cache/clear',array('type'=>'template'))}">缓存更新</a>
                                </div>
                                <div class="item-prompt">当修改模板时，模板没及时生效可以对模板缓存进行更新</div>
                            </dd>
                        </dl>
                        <dl class="clearfix noline">
                            <dt><label >网站运行日志：</label></dt>
                            <dd>
                                <div class="item-field clearfix">
                                    <a class="button button-blue btn-clear" data-url="{:U('cache/clear',array('type'=>'logs'))}">缓存更新</a>
                                </div>
                                <div class="item-prompt">网站运行过程中会记录各种错误日志，以文件的方式保存</div>
                            </dd>
                        </dl>
                    </form>
                </div>
            </div>
        </div>
    </div>
</block>
<block name="script">
    <script>
        $('.btn-clear').click(function(){
            layer.msg('删除中', {icon: 16,time:30000});
            var url = $(this).attr('data-url');
            $.getJSON(url, function(res){
                if(res.status)
                {
                    layer.closeAll();
                    layer.msg(res.msg);
                }

            })
        })
    </script>

</block>